import request from '@/utils/request'

//const menuBaseUrl =   "/backend-admin/menu";
const menuBaseUrl = process.env.VUE_APP_CONTENXT_PATH + '/menu'
console.log('baseurl')
console.log(menuBaseUrl)

export function menulist(query) {
    return request({
        url: menuBaseUrl  + '/list',
        method: 'get',
        params: query
    })
}

export function deleteMenu(id) {
    return request({
        url: menuBaseUrl + '/delete/' + id,
        method: 'post',
    })
}

export function editMenu(form) {
    return request({
        url: menuBaseUrl + '/edit',
        method: 'post',
        data: form
    })
}


export function addMenu(menuForm) {
    return request({
        url: menuBaseUrl + '/add',
        method: 'post',
        data: menuForm
    })
}


